<template>
	<view class="home-type">
		<NavBarTap :title="'研究成果展示'" />
		<video v-if="configData == 1" class="home-image" style="width: 100%; height: 500rpx;"
			src="http://oss-prod.lizxx.com/video/chengguozhanshi.mp4" mode="widthFix"></video>
		<image v-else class="home-image" style="width: 100%;" :src="imageUrl + '/chengguozhanshi.png'" mode="widthFix">
		</image>
	</view>
</template>

<script>
	import {
		getConfigValue
	} from "@/api/home/home.js"
	import NavBarTap from '@/components/NavBarTap.vue'
	export default {
		components: {
			NavBarTap
		},
		data() {
			return {
				configData: '',
				imageUrl: this.$imageUrl,
			};
		},
		onLoad() {
			this.getConfigValue()
		},
		methods: {
			async getConfigValue() {
				let res = await getConfigValue('wxHomeIsVedio')
				this.configData = res.data
			}
		}
	}
</script>

<style lang="scss">
	.home-type {
		min-height: 100vh;
		width: 100vw;
		background-color: #fff;
	}

	.home-image {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}
</style>